﻿using System.Windows;

namespace MediaBrowser.CustomWindow
{
    /// <summary>
    /// Affiche un message 
    /// </summary>
    public sealed class CustomMessageBox
    {
        public static MessageBoxResult Show(string messageBoxText)
        {
            return Show(null, messageBoxText, "", MessageBoxButton.OK, MessageBoxImage.None);
        }

        public static MessageBoxResult Show(string messageBoxText, string caption)
        {
            return Show(null, messageBoxText, caption, MessageBoxButton.OK, MessageBoxImage.None);
        }

        public static MessageBoxResult Show(Window owner, string messageBoxText)
        {
            return Show(null, messageBoxText, "", MessageBoxButton.OK, MessageBoxImage.None);
        }

        public static MessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button)
        {
            return Show(null, messageBoxText, caption, button, MessageBoxImage.None);
        }

        public static MessageBoxResult Show(Window owner, string messageBoxText, string caption)
        {
            return Show(owner, messageBoxText, caption, MessageBoxButton.OK, MessageBoxImage.None);
        }

        public static MessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon)
        {
            return Show(null, messageBoxText, caption, button, icon);
        }

        public static MessageBoxResult Show(Window owner, string messageBoxText, string caption, MessageBoxButton button)
        {
            return Show(owner, messageBoxText, caption, button, MessageBoxImage.None);
        }

        public static MessageBoxResult Show(Window owner, string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon)
        {
            CustomWindowDialog customWindowDialog = new CustomWindowDialog();
            customWindowDialog.TxMessage = messageBoxText;
            customWindowDialog.Title = caption;
            customWindowDialog.Button = button;
            customWindowDialog.IconMessage = icon;
            customWindowDialog.Owner = owner;
            customWindowDialog.ShowDialogAnimated();
            return customWindowDialog.MessageBoxResult;
        }
            
      
    }
}
